#include <vtkSmartPointer.h>
#include <vtkPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkParametricFunctionSource.h>
#include <vtkParametricSpline.h>
#include <vtkProperty.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkPlaneSource.h>

#include <vtkAssembly.h>
#include <vtkSphereSource.h>
#include <vtkTransform.h>
#include <qvector.h>
#include <vtkLineSource.h>
#include <vtkTransformPolyDataFilter.h>
#include <vtkCellPicker.h>
#include <vtkAxesActor.h>
#include <vtkOrientationMarkerWidget.h>
#include <vtkArrowSource.h>
#include <vtkMath.h>

#include "MathFun.hpp"

class BiteSurfaceModel
{
public:
    BiteSurfaceModel(vtkPoints* selectedPoints, vtkObject* qvtk);

    double* get_vector_D(double** selPoints);
    vtkAssembly* get_assembly() const { return m_assembly; }
    vtkActor* get_actor() { return m_actor; };
    QVector<vtkActor*> get_actorPos() { return m_actorPos; };

    vtkActor* draw_pos(double* picked);

    bool get_visibility() { return m_visibility; }
    void VisibilityOff() { m_assembly->VisibilityOff(); m_visibility = false; }
    void VisibilityOn() { m_assembly->VisibilityOn(); m_visibility = true; }
private:
    bool m_visibility = true;

    double* m_vector;
    double m_D;

    vtkSmartPointer<vtkActor> m_actor = vtkSmartPointer<vtkActor>::New();
    vtkSmartPointer<vtkActor> m_actorMid = vtkSmartPointer<vtkActor>::New();
    QVector<vtkActor*> m_actorPos;

    vtkSmartPointer<vtkAssembly> m_assembly = vtkSmartPointer<vtkAssembly>::New();
};
